package com.tust.app.dao;

import com.tust.app.domain.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface UserMapper {

    User findById(Integer id);
    List<User> findAll();
    @Options(useGeneratedKeys = true, keyProperty = "id")
    void insert(User user);
    boolean update(User user);
    boolean deleteById(Integer id);
    List<User> searchUserByUsername(String username);
    User findByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

}